<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<center>
  
  <center>
    <h2>CHASSIS</h2>
  </center>
</center>
<%   
  try
  {
  		Class.forName("com.mysql.jdbc.Driver");
  		Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/project", "root", "dasta99");
   		Statement s=con.createStatement();
   		ResultSet rs=s.executeQuery("select * from equipmentChasis");
%>



<table width="1" border="1" align="center" cellpadding="7">
<tr><th>DN</th><th>ID</th><th>ADMINSTATE</th><th>VENDOR</th><th>MODEL</th><th>THERMAL</th><th>SERIAL</th><th>POWER</th><th>OPERABILITY</th><th>OPERSTATE</th><th>CONFIGSTATE</th><th>FABRICEPDN</th></tr>
 <% while(rs.next()){ %>
 
 <tr> 
 <center>
  <td><% out.println(rs.getString(1)); %></td>
  </center>
  <center>
  <td><% out.println(rs.getString(2)); %></td>
  </center>
  <center>
  <td><% out.println(rs.getString(3)); %></td>
  </center>
  <td><% out.println(rs.getString(4)); %></td>
  <td><% out.println(rs.getString(5)); %></td>
  <td><% out.println(rs.getString(6)); %></td>
  <td><% out.println(rs.getString(7)); %></td>
  <td><% out.println(rs.getString(8)); %></td>
  <td><% out.println(rs.getString(9)); %></td>
  <td><% out.println(rs.getString(10)); %></td>
  <td><% out.println(rs.getString(11)); %></td>
  <td><% out.println(rs.getString(12)); %></td>
  
  
 </tr>
 <% } %>
 <%} catch(Exception e)
 {
  e.printStackTrace();
 }%>
 
</table>
 

</body>
</html>